package com.kuang.service.impl;

import com.kuang.dao.BlogTagMapper;
import com.kuang.pojo.Blog;
import com.kuang.pojo.BlogTag;
import com.kuang.pojo.VoTag;
import com.kuang.service.BlogTagService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BlogTagServiceImpl implements BlogTagService {
    @Autowired
    private BlogTagMapper blogTagMapper;

    @Override
    public int insertBlogTag(Integer blogid, Integer tagid) {
        return blogTagMapper.insertBlogTag(blogid, tagid);
    }

    @Override
    public int deleteByBlogId(Integer blogid) {
        return blogTagMapper.deleteByBlogId(blogid);
    }

    @Override
    public List<BlogTag> selectBlogTagByBlogId(Integer id) {
        return blogTagMapper.selectBlogTagByBlogId(id);
    }

    @Override
    public List<BlogTag> selectAllBlogTag() {
        return blogTagMapper.selectAllBlogTag();
    }

//    @Override
//    public int updateBlogTagById(Integer id, Integer tagid) {
//        return blogTagMapper.updateBlogTagById(id, tagid);
//    }

    @Override
    public List<BlogTag> selectIdByBlogId(Blog blog) {
        return blogTagMapper.selectIdByBlogId(blog);
    }

    @Override
    public int updateBlogIdByTagId(Integer tagid) {
        return blogTagMapper.updateBlogIdByTagId(tagid);
    }

    @Override
    public List<VoTag> selectAllBlogTagGroupTagId() {
        return blogTagMapper.selectAllBlogTagGroupTagId();
    }

    @Override
    public List<BlogTag> selectBlogTagByTagId(Integer tagid) {
        return blogTagMapper.selectBlogTagByTagId(tagid);
    }


}
